
<!DOCTYPE HTML PUBLIC "-//W3C//DTD -//W3C//DTD HTML 4.01//EN//EN" "">
<%@ page contentType="text/html; charset=utf-8" %>
<%@page import="controller.Controller"%>
<%@ page import="java.util.*,dataBase.*"%>
<%@page import="com.google.appengine.api.datastore.Key"%>
<%@page import="sessionMenegment.SessionMgr"%>
<%@page import="language.LangFactory"%>
<%@page import="language.LangIntrf"%>
<%
	LangFactory langFactory= new LangFactory();
	String langName = request.getParameter("lang");
	LangIntrf lang =null;
	if(langName!=null){
		lang = langFactory.getLang(request.getParameter("lang"));
		session.setAttribute("lang",langName);
	}
	else
		lang = langFactory.getLang((String)session.getAttribute("lang"));
	String langSign = lang.getLang();
	
	
%>
<html>

	<head>
		<link rel="icon" href="images/synca.png" type="image/x-icon"/> 
		<link rel="shortcut icon" href="images/synca.png" type="image/x-icon"/>
		<link href="styleClient.css" rel="stylesheet" type="text/css" />
		<link href="e.css" rel="stylesheet" type="text/css" />
		<link href="try3.css" rel="stylesheet" type="text/css" />
        
        <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="jquery.tools.min.js"></script>
		<script type="text/javascript" src="jquery-ui-1.7.1.custom.min.js"></script>
        <script type="text/javascript" src="jquery.address-1.4.min.js"></script>
        <script src="javascript/jpicker-1.1.6.min.js" type="text/javascript"></script>
		<title>Synca</title>
		 <%
		 	Controller controller = Controller.getInstance();
		 	String clientName = (String)session.getAttribute("userNameClient");
		 	Client client = controller.getClient(clientName);
		 %>
        <script>
			jQuery(document).ready(
				function() {

					$.address.history(false).strict(false).change(function(event){																	
						var tab = event.value;									
						(tab=='general' || tab=='') ? visiableMain('general') : hiddenMain('general');

   					}).history(true);
					$("#logOut").click(function(){
							$.post("logOutBusiness",function(){$(location).attr('href','home.jsp');});
					});
					$("#profile").click(function(){
						$.post("myProfileClient",function(){$(location).attr('href','myProfileClient2.jsp');});
				    });	
					$("#terminal").click(function(){
						window.location.href = "allClientOrders.jsp";
					});
				}
			);

		</script>
        
	</head>

	<body>
<div id="container">
		
		<div id="headerLogedIn">

        <div class="menu_nav_logedIn menu_nav_logedIn2">
            <ul id="menu">
            	<li id="terminal"><%=lang.getTERMINAL_BUTTON() %></li>
                <li id="profile"><%=lang.getMY_PROFILE_LABEL() %></li>
                <li id="logOut"><%=lang.getLOG_OUT_BUTTON() %></li>
            </ul>
        </div>	
        	
		</div>

		<div id="left_sidebar">
            <div class="side_buttons">
                <ul>
                    <a href="#general"><li><%=lang.getGENERAL_BUTTON() %></li></a>
                    
                </ul>
        	</div>
		</div>
			
<div id="main_content">
 <div style="padding-left: 43%; font-size: 20px; font-weight: bold;  "><%=lang.getMY_PROFILE_LABEL() %></div>
 <center>

 <br /><br /><br />

 <form id="myform2"  method="post" action="changePropertiesClient" accept-charset="ISO-8859-1">
 <div id="general">
 	<div id="stylized" class="myform1">
                    
                    <h1><%=lang.getGENERAL_LABEL() %></h1>
                    <p></p>

                    <div id="firstForm">
                    <table dir="<%=lang.getDirection()%>" >
                    	<tr valign="top">
                        	<td align="right">
                            	<label class="reg"><%=lang.getUSERNAME_LABEL() %></label>
                            </td>
                            <td>
                            	<input type="text"  id="userName" name="userName" title="select free user name"  disabled="disabled" value="<%= client.getUserName()%>"/>
                            </td>
                        </tr>
                        <tr valign="top">
                        	<td align="right">
                            	<label class="reg"><%=lang.getPASSWORD_LABEL() %></label>
                            </td>
                            <td>
                            	<input type="password"  id="password" name="password" title="choose password" value="<%= client.getPassword()%>"/>
                            </td>
                        </tr>
                        <tr valign="top">
                        	<td align="right">
                            	<label class="reg"><%=lang.getCONFIRM_PASSWORD_LABEL() %></label>
                            </td>
                            <td>
                            	<input type="password" id="password1" name="password1" title="confirm the password" value="<%= client.getPassword()%>"/>
                            </td>
                        </tr>
                        <tr valign="top">
                        	<td align="right">
                            	<label class="reg"><%=lang.getEMAIL_LABEL()%></label>
                            </td>
                            <td>
                            	<input type="text"  id="email" name="email" title="In this email you will get confirmation about the registration" value="<%= client.getEmail().getEmail()%>"/>
                            </td>
                        </tr>
                        <tr valign="top">
                        	<td align="right">
                            	<label class="reg"><%=lang.getPHONE_NUMBER_LABEL()%></label>
                            </td>
                            <td>
                            	<input type="text"  id="phone"  name="phone" title="fiil your phone number" value="<%= client.getPhoneNumber().getNumber()%>"/>
                            </td>
                        </tr>
                    </table>

                    </div>
                    
                    <div class="spacer"></div>
                    
                    
                </div>
          </div>
				<%String validateError = (String)session.getAttribute("validError");
					if(validateError!=null){	
				%>
				<label style="color: #ff0000" ><%=validateError %></label>
				<%		session.setAttribute("validError",null);
					}%>
          		<button class="formButton2" type="submit" id="submitButton" >Save All Changes</button>
          </form>
          
 </center>

	<div class="clearer">&nbsp;</div>
</div>	


		<div id="footer">
	<a href="myProfileClient2.jsp?lang=he"><img src="images/hebrew.gif" width="30px" style="float: left; margin-top: 0.5%; margin-left: 0.5%;"/></a>
	<a href="myProfileClient2.jsp?lang=en"><img src="images/english.gif" width="30px" style="float: left; margin-top: 0.5%;margin-left: 0.5%;"/></a>

<center>
			<p><%=lang.getCOPY_RIGHT_LABEL() %>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;               
				<a href="home.jsp"><%=lang.getHOME_BUTTON() %></a> &nbsp;&nbsp;| &nbsp;&nbsp;
				<a href="home.jsp#customers"><%=lang.getCONTACT_BUTTON()%></a> &nbsp;&nbsp;|&nbsp;&nbsp;
				<a href="home.jsp?#about"><%=lang.getABOUT_BUTTON() %></a>
			</p>
		</center>
	</div>
</div>


	</body>

</html>
